public class Angles
{
   public static void main (String[] args)
   {
      // Display prompt for degrees of angle
      System.out.print("Please enter the number of degrees of angle: ");

      // Read angle in degrees
      Scanner in = new Scanner(System.in);
      int angle = in.nextInt();

      // Compute normalized value of angle

      // Your work here
      int normalized = angle;
      while (normalized < 0 || normalized > 359) {
         if (normalized > 0) normalized -= 360;
         else normalized += 360;
      }

     
      System.out.println(normalized);
   }
}